import Vue from 'vue';
import Router from 'vue-router';
import ShoppingCart from './views/ShoppingCart';
import TodoList from './views/TodoList';

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/todo',
    },
    {
      path: '/todo/:state',
      name: 'todo',
      component: TodoList,
    },
    {
      path: '/cart',
      name: 'cart',
      component: ShoppingCart,
    },
  ],
});
